package com.jd.platform.sample3.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jd.platform.sample3.entity.pojo.Produce;
import com.jd.platform.sample3.mapper.ProduceMapper;
import com.jd.platform.sample3.service.ProduceService;
import com.jd.platform.sample3.service.redis.ProduceServiceRedis;
import com.jd.platform.sample3.util.AttributeUtil;
import com.jd.platform.sample3.util.Cache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProduceServiceImpl extends ServiceImpl<ProduceMapper, Produce> implements ProduceService {
    @Autowired
    private ProduceServiceRedis produceServiceRedis;

    @Override
    public Object getById_Redis(int id,String... attributes) throws Exception {
        return produceServiceRedis.getById_Redis(id,attributes);
    }

    @Override
    public void InsertOrUpdate_Redis(Object object) throws Exception {
        produceServiceRedis.InsertOrUpdate_Redis(object);
    }

    @Override
    public void deleteById_Redis(Object object) throws Exception {
        produceServiceRedis.deleteById_Redis(object);
    }
}
